#include "imageviewport.h"

ImageViewport::ImageViewport(LabelManager *manager, QWidget *parent) :
    QLabel(parent),labelManager(manager)
{
}

void ImageViewport::mousePressEvent(QMouseEvent *event){
    labelManager->mousePressEvent(event);
}

void ImageViewport::mouseReleaseEvent(QMouseEvent *event){
    labelManager->mouseReleaseEvent(event);
}

void ImageViewport::mouseMoveEvent(QMouseEvent *event){
    labelManager->mouseMoveEvent(event);
}


void ImageViewport::keyPressEvent(QKeyEvent *event){
    if(event->type()==QEvent::KeyPress && event->key()==Qt::Key_Delete){
        labelManager->RemoveSelectedLabel();
    }
}
